package com.emmmya.ocs.modules.system.file.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.emmmya.harinCheck.annotation.Check;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.emmmya.ocs.common.base.BaseEntity;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @description:
 * @author: 咕噜肉IT小店-黑医
 * @createDate: 2020-07-01
 * @version: 1.0
 */
@Data
@Table(name="h_directory")
@TableName("h_directory")
@Entity
public class Directory  extends BaseEntity {

    @Check(name = "目录名称")
    private String dirName;

    @Check(name = "是否为根目录")
    private String isRoot;

    @Check(name = "父级目录ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    @Check(name = "全路径")
    private String path;
}
